package com.wk.springbootlearn.controller;

import com.wk.springbootlearn.common.model.Response;
import com.wk.springbootlearn.service.TestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "功能测试", tags = "功能测试模块")
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestService testService;

    @ApiOperation("redis测试")
    @GetMapping("/redis-test")
    public Response redisTest() {
        return new Response().setData(testService.redisTest());
    }

    @ApiOperation("HttpClient测试")
    @GetMapping("/http-client-test")
    public Response httpClientTest() {return new Response().setData(testService.httpClientTest());}
}
